# -*- coding: utf-8 -*-
'''
Initial the global utility:

'''
import json

class Utility():
	"""docstring for Utility"""
	
	def jsonDump(self,success,message,data = None):

		result = {
			"Success": success,
			"Message": message,
			"Data": data
		}
		return json.dumps(result,default = self.object2dict)

	def object2dict(self,obj):
		d = dict((key.lstrip('_'), value) for key, value in obj.__dict__.items())
		return d